#include "console.h"
#include "debug.h"
#include "gdt.h"
#include "timer.h"
#include "pmm.h"

int _kernel_entry()
{
    console_clear();
    init_debug();
    init_gdt();
    init_idt();
    init_timer(200);
    printk_color(rc_black, rc_green, "Hello,Os Kernel\n");
    asm volatile("sti");
    asm volatile("int $0x3");
    asm volatile("int $0x4");
    printk("kernel in memory start: 0x%08X\n", kernel_mem_start);
    printk("kernel in memory end:   0x%08X\n", kernel_mem_end);
    printk("kernel in memory used:   %d KB\n\n", (kernel_mem_end - kernel_mem_start + 1023) / 1024);
    
    show_memory_map();
    return 0;
}
void panic_test()
{
    panic("abc");
}